<!-- 团队列表模板 -->
<script id="teamList_template" type="text/template">
    <table class="table table-striped">
        <thead>
            <tr>
                <th style="text-align: center;width: 20%;">团队编号</th>
                <th style="text-align: center;width: 20%">团队名称</th>
                <th style="text-align: center;width: 30%;">对接人员</th>
                <th style="text-align: center;width: 30%;">操作</th>
            </tr>
        </thead>
        <tbody>
            <% data.forEach(function (item) { %>
            <tr>
                <td style="text-align: center;"><%= item.teamId %></td>
                <td style="text-align: center;"><%= item.teamName %></td>
                <td style="text-align: center;word-wrap:break-word"><%= item.operatorName %></td>
                <td style="text-align: center;">
                    <button class="badge btn-success btn-sm active" data-toggle="tooltip" data-placement="top" title="" data-original-title="加入这个团队" onclick="joinTeam(<%= item.teamId %>)">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>加入
                    </button>
                    <button class="badge btn-danger btn-sm active" data-toggle="tooltip" data-placement="top" title="" data-original-title="移出这个团队" onclick="leaveTeam(<%= item.teamId %>)">
                        <span class="glyphicon glyphicon-minus" aria-hidden="true"></span>移出
                    </button>
                    <button class="badge btn-warning btn-sm active" data-toggle="tooltip" data-placement="top" title="" data-original-title="删除这个团队" onclick="deleteTeam(<%= item.teamId %>)">
                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>删除
                    </button>
                    <a class="badge btn-info btn-sm active" href="/lego/editTeamIndex/<%= item.teamId %>" target="_blank">
                        <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>编辑
                    </a>
                </td>
            </tr>
            <% }) %>
        </tbody>
    </table>
</script>

<!-- 添加页面 - 选择团队 -->
<script id="selectTeam_template" type="text/template">
    <select name="teamId" id="teamId" class="form-control" data-live-search="true">
        <option></option>
        <% data.forEach(function(item){ %>
        <option value="<%= item.teamId %>"><%= item.teamName %></option>
        <% }) %>
    </select>
</script>

<!-- 项目列表模板 -->
<script id="projectList_template" type="text/template">
    <table class="table table-striped">
        <thead>
        <tr>
            <th style="text-align: center;width: 10%;">序号</th>
            <th style="text-align: center;width: 20%">团队</th>
            <th style="text-align: center;width: 20%;">项目名</th>
            <th style="text-align: center;width: 10%;">环境</th>
            <th style="text-align: center;width: 15%;">地址</th>
            <th style="text-align: center;width: 25%;">操作</th>
        </tr>
        </thead>
        <tbody>
        <% data.forEach(function (item) { %>
        <tr>
            <td style="text-align: center;"><%= item.projectId %></td>
            <td style="text-align: center;"><%= item.teamName %></td>
            <td style="text-align: center;"><%= item.projectName %></td>
            <td style="text-align: center;"><%= item.env %></td>
            <td style="text-align: center;"><%= item.ip %>:<%= item.port %></td>
            <td style="text-align: center;">
                <button class="badge btn-success btn-sm active" onclick="editProject(<%= item.projectId %>)" target="_blank">
                    <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>编辑
                </button>
                <button class="badge btn-danger btn-sm active" onclick="deleteProject(<%= item.projectId %>)">
                    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>删除
                </button>
                <a class="badge btn-info btn-sm active" href="/lego/projectDetailIndex/<%= item.projectId %>" target="_blank">
                    <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查看
                </a>
            </td>
        </tr>
        <% }) %>
        </tbody>
    </table>
</script>

<!-- 添加页面 - 选择项目 -->
<script id="selectProject_template" type="text/template">
    <select name="projectId" id="projectId" class="form-control" data-live-search="true">
        <option value="-1"></option>
        <% data.forEach(function(item){ %>
        <option value="<%= item.projectId %>"><%= item.projectId %>、<%= item.projectName %> - <%= item.env %></option>
        <% }) %>
    </select>
</script>

<!-- 用例列表模板 -->
<script id="testCaseList_template" type="text/template">
    <table class="table table-striped">
        <thead>
        <tr>
            <th style="text-align: center;width: 5%;">ID</th>
            <th style="text-align: center;width: 20%">团队</th>
            <th style="text-align: center;width: 20%;">项目名</th>
            <th style="text-align: center;width: 5%;">环境</th>
            <th style="text-align: center;width: 30%;">url</th>
            <th style="text-align: center;width: 10%;">状态</th>
            <th style="text-align: center;width: 10%;">操作</th>
        </tr>
        </thead>
        <tbody>
        <% data.forEach(function (item) { %>
        <tr>
            <td style="text-align: center;"><%= item.caseId %></td>
            <td style="text-align: center;"><%= item.teamName %></td>
            <td style="text-align: center;"><%= item.projectName %></td>
            <td style="text-align: center;"><%= item.env %></td>
            <td><p class="omitTxt"><%= item.url %></p></td>
            <td style="text-align: center;"><%= item.statusDesc %></td>
            <td style="text-align: center;">
                <button class="badge btn-success btn-sm active" onclick="editTestCase(<%= item.caseId%>)">
                    <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>编辑
                </button>
                <button class="badge btn-danger btn-sm active" onclick="deleteTestCase(<%= item.caseId %>)">
                    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>删除
                </button>
            </td>
        </tr>
        <% }) %>
        </tbody>
    </table>
</script>